package com.xm.myapplication.MVP.A.Presenter;


import android.content.Context;

import com.xm.httpapi.BaseView.BasePresenter;
import com.xm.myapplication.MVP.A.IDemo;
import com.xm.myapplication.MVP.A.Model.LoginResult;
import com.xm.myapplication.MVP.A.Model.Model;
import com.xm.myapplication.MVP.A.Model.PwdLoginRequest;
import com.xm.myapplication.MVP.A.View.MVPActivity;

import java.util.List;
import java.util.Map;


public class Presenter extends BasePresenter<MVPActivity, Model> implements IDemo.IPresenter {

    @Override
    public void load(PwdLoginRequest pwdLoginRequest) {
        model.getData(pwdLoginRequest,request(data -> getView().setData((LoginResult)data), err -> getView().error(err),true));
    }

    @Override
    public void load(PwdLoginRequest pwdLoginRequest, Context context) {

    }

    @Override
    protected Map<String, List<String>> getMap() {
        return null;
    }
}

